home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / mt_v20.arc / SORT.HLP < prev    next >
Text File  |  1990-08-13  |  3KB  |  40 lines

  1.  ---------------------------------------------------------------------------- 
  2.  S O R T  Filter COMMAND                                                      
  3.  ---------------------------------------------------------------------------- 
  4.                                                                               
  5.  Purpose: Reads data from the standard input device, sorts the data, then     
  6.           writes the data to the standard output device.                      
  7.                                                                               
  8.  Format:  [d:][path]SORT [/R][/+n]                                            
  9.                                                                               
  10.  Remarks: [d:][path] before SORT, to specify the drive and path that contains 
  11.           the SORT command.                                                   
  12.                                                                               
  13.           /R to sort in reverse order.  For example, where "Z" comes before   
  14.           "A".                                                                
  15.                                                                               
  16.           /+n to start sorting at then nth column, where n is an integer      
  17.           value.  If you do not specify n, the default is column 1.  The      
  18.           maximum file that you can sort is 63K in length.                    
  19.                                                                               
  20.           The output filename must be different from the input filename.      
  21.                                                                               
  22.           The SORT command can be used as filter as well as a command, mean-  
  23.           ing information like a file directory listing can be piped through  
  24.           the SORT command to display a sort file directory listing. Examples 
  25.           of this technique are demonstrated below.                           
  26.                                                                               
  27.                                                                               
  28.  Example: The following example pipes the output of the DIR command to the    
  29.           SORT filter.  Then the directory listing is sorted starting with    
  30.           column 14 (column 14 of a directory listing is the 1st character    
  31.           of file size).  The output is sent to the standard output device,   
  32.           which in this case is the screen.                                   
  33.                                                                               
  34.                 DIR | SORT /+14        sort dir and display on screen         
  35.                 DIR | SORT /+14 > PRN  sort dir and route to the printer      
  36.                                                                               
  37.           SORT /R <UNSORT.TXT > SORTED.TXT  would sort in descending order    
  38.           the file UNSORT.TXT and writes the new file SORTED.TXT on the cur-  
  39.           rent drive and in the current directory.                            
  40.